package Decorator;

import Component.Component;

//父装饰器
public abstract class Decorator extends Component {
    private Component initComponent;

    public Decorator(Component initComponent){ //传入要被装饰的对象
        this.initComponent=initComponent;
    }

    @Override
    public void operation(String outText){
        this.initComponent.operation(outText);
    }
}
